﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace TransCend.Exceptions
{
    public sealed class ExceptionErrorCode
    {
        /// <summary>
        /// 没有错误
        /// </summary>
	    public const int NOT_ERROR = 0;
	    /// <summary>
        /// 错误消息，未知错误
	    /// </summary>
        public const int ERROR = -1;
        /// <summary>
        /// 未登录
        /// </summary>
	    public const int NOT_LOGIN = -2;
	    /// <summary>
        /// 没有操作权限
	    /// </summary>
	    public const int NOT_PRIVLEGE = -3;
	    /// <summary>
        /// 非管理操作对象,后台管理ACTION需继承
	    /// </summary>
	    public const int NOT_MANAGER = -4;
	    /// <summary>
        /// 验证错误
	    /// </summary>
	    public const int DATA_VALIDATOR_ERROR = -5;
	    /// <summary>
        /// token 为空
	    /// </summary>
	    public const int TOKEN_NULL = -6;
	    /// <summary>
        /// 请求方法错误
	    /// </summary>
	    public const int REQUEST_METHOD_ERROR = -7;
	    /// <summary>
        /// 没有内容操作权限
	    /// </summary>
	    public const int NOT_CONTENT_PRIVLEGE = -8;
	    /// <summary>
        /// CSRF错误
	    /// </summary>
	    public const int REQUEST_CSRF_ERROR = -9;
	    /// <summary>
        /// IP拒绝
	    /// </summary>
	    public const int REQUEST_IP_ERROR = -10;
	    /// <summary>
	    /// 授权错误
	    /// </summary>
	    public const int AUTHORIZATION_ERROR = -11;
	    /// <summary>
        /// 被锁/版本冲突
	    /// </summary>
	    public const int LOCK_ERROR = -12;
	    /// <summary>
        /// AES 加密解密错误
	    /// </summary>
	    public const int AES_PWD_ERROR = -13;
	    /// <summary>
        /// 请求扩展名错误
	    /// </summary>
	    public const int REQUEST_EXT_ERROR = -14;
	    /// <summary>
        /// 请求签名错误
	    /// </summary>
	    public const int REQUEST_SIGN_ERROR = -15;
	    /// <summary>
        /// 请求签名时间错误
	    /// </summary>
	    public const int REQUEST_SIGN_DATE_ERROR = -16;


        /// <summary>
        /// 文件未找到
        /// </summary>
	    public const int FILE_NOT_FIND = 10001;
	    /// <summary>
        /// 文件IO错误、读取、写入
	    /// </summary>
	    public const int FILE_IO_ERROR = 10002;
	    /// <summary>
        /// 文件已存在
	    /// </summary>
	    public const int FILE_EXITS_ERROR = 10003;
	    /// <summary>
        /// 删除非空文件夹失败
	    /// </summary>
	    public const int FILE_DEL_NOT_NULL = 10004;
	    /// <summary>
        /// 系统错误，请重试！
	    /// </summary>
	    public const int SYSTEM_ERROR = 10010;
	    /// <summary>
        /// 保存失败
	    /// </summary>
	    public const int SYSTEM_SAVE_ERROR = 10011;
	    /// <summary>
        /// 删除失败
	    /// </summary>
	    public const int SYSTEM_DEL_ERROR = 10012;
	    /// <summary>
        /// 记录已删除,不存在
	    /// </summary>
	    public const int SYSTEM_DEL_YES = 10013;
	    /// <summary>
        /// 更新失败，违反数据完整性
	    /// </summary>
	    public const int SYSTEM_ERROR_INTEGRITY  = 10014;
	    /// <summary>
        /// 更新失败，有数据不能为空
	    /// </summary>
	    public const int SYSTEM_ERROR_NOT_NULL  = 10015;
	    /// <summary>
        /// 更新失败，名称重复
	    /// </summary>
	    public const int SYSTEM_NAME_EXISTS  = 10016;
    }
}
